package com.xr.blog.controller;

import com.xr.blog.service.BlogConfigService;
import com.xr.blog.tools.Result;
import com.xr.blog.tools.constant.Code;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;


/**
 * 博客配置表
 *
 * @author XRJ
 * @email 1033835209@qq.com
 * @date 2020-07-07 20:31:38
 */
@RestController
@RequestMapping("/squirrelblog")
public class BlogConfigController {
    @Autowired
    private BlogConfigService blogConfigService;

    @GetMapping(value = "/config/global",produces = "application/json;charset=UTF-8")
    public Result<Map<String, String>> global() {
        return Result.of(Code.SC_OK.getState(),Code.SC_OK.getDescription(),blogConfigService.findAllGlobal());
    }

}
